Skip to content

Move to_const function from Graphene into Graphene-Django#992

Merged
jkimbo merged 2 commits into
masterfrom
add-to-const-function
Jun 25, 2020
Merged

Move to_const function from Graphene into Graphene-Django#992
jkimbo merged 2 commits into
masterfrom
add-to-const-function

Conversation

@jkimbo

@jkimbo jkimbo commented Jun 24, 2020

Copy link
Copy Markdown
Member

This PR moves the to_const string converter function from the Graphene project into the Graphene-Django one because it is only used in the Graphene-Django project. See: graphql-python/graphene#1208

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing the dependency down from graphene down to graphene_django makes sense if is not used graphene 👍

@jkimbo jkimbo merged commit 1bec8e4 into master Jun 25, 2020
@jkimbo jkimbo deleted the add-to-const-function branch June 25, 2020 14:11
@jkimbo

jkimbo commented Jun 25, 2020

Copy link
Copy Markdown
Member Author

Released in v2.11.0

@noelleleigh

Copy link
Copy Markdown
Contributor

Can this patch also be applied to the v3 branch? I'm getting an import error after installing graphene-django 3.0.0b3, which installed graphene 3.0.0b3:

File "/usr/local/lib/python3.6/dist-packages/graphene_django/converter.py", line 25, in <module>
    from graphene.utils.str_converters import to_camel_case, to_const
ImportError: cannot import name 'to_const'

jkimbo added a commit that referenced this pull request Jun 27, 2020
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
@jkimbo

jkimbo commented Jun 27, 2020

Copy link
Copy Markdown
Member Author

@noelleleigh just released v3.0.0b4 that includes this change. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants